###                           Replication Data for:                                                 ###
### Keeping Tabs through Collaboration? Sharing Ministerial Responsibility in Coalition Governments ###

### Session Info ###
R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.3.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] forcats_0.5.1      stringr_1.4.0      dplyr_1.0.8        purrr_0.3.4        readr_2.1.1        tidyr_1.2.0       
 [7] tibble_3.1.6       ggplot2_3.3.5      tidyverse_1.3.1    metR_0.5.0         xtable_1.8-4       vtable_1.3.3      
[13] kableExtra_1.3.4   interactions_1.1.5 betareg_3.1-4      stargazer_5.2.2    lmtest_0.9-39      zoo_1.8-9         
[19] sandwich_3.0-1     haven_2.4.3        stringdist_0.9.8 



The analysis has been carried out with R. In order to replicate the analysis, please make sure to have R installed locally on your computer.

Use RStudio and create a new project in the directory where you saved the replication files. Upon initializing, this will bootstrap a RENV environment. 

ATTENTION:
Since R on Windows has some troubles encoding utf-8, there is a different process depending on whether you replicate the analysis on Windows or UNIX-based OS:

1) UNIX
Simply execute

### 00_run.R ###

This script first installs the correct versions of all required packages from the provided lock file. Then it defines some helper functions to be used later in the data preparation process.

Thereafter, 00_run.R execute the following scripts:

1) 01_data_preparation.R: This script loads all required datasets, preprocesses them and creates the final dataset to be used in the analyses
2) 02_regression_analyses.R: This script estimates all regression models discussed in the manuscript and the appendices.
03) 03_figures.R This script creates all figures displayed in the manuscript and the appendices. The figures are saved in the wd, using the same labels as in the manuscript/appendices.
04) 04_tables.R: This script creates all tables shown in the manuscript and the appendices. Tables are not saved, but displayed in the console as both txt and tex.

2) Windows
Please execute

### 00_run.R ###

This script first installs the correct versions of all required packages from the provided lock file. Then it defines some helper functions to be used later in the data preparation process.

Thereafter it stops and prompts you to run the remaining scripts individually. Please use RStudio to select the remaining scripts in corresponding order, highlight everything, and run them.